
package com.jacoco.hefei.maven.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
 *
 * @类描述：
 *
 * hefei
 * @创建时间：2021年8月10日 下午8:30:39
 *
 *
 */

@Api(value = "Demo",tags="Demo")
@RestController
@RequestMapping("/base")
public class demo {

    @CrossOrigin
    @ApiOperation(notes = "Login",value = "Login")
    @GetMapping("/Login")
    public String Login(  @RequestParam("username") String username,@RequestParam("passwd") String passwd){

         System.out.println("=========login=============");
         System.out.println("username:"+username);
         System.out.println("passwd:"+passwd);
        return  "SUCCESS";
    }

    @CrossOrigin
    @ApiOperation(notes = "updateUsername",value = "updateUsername")
    @GetMapping("/updateuser")
    public Boolean updateuser( @RequestParam("username") String username,@RequestParam("passwd") String passwd){
        System.out.println("=========updateuser=============");
        System.out.println("username:"+username);
        System.out.println("passwd:"+passwd);
        return true;
    }


    @CrossOrigin
    @ApiOperation(notes = "updatepassWord",value = "updatepassWord")
    @GetMapping("/updatePw")
    public Boolean updatePw( @RequestParam("username") String username,@RequestParam("passwd") String passwd){
        System.out.println("=========updatepassWord=============");
        System.out.println("username:"+username);
        System.out.println("passwd:"+passwd);
        return true;
    }
    @CrossOrigin
    @ApiOperation(notes = "newUsers",value = "newUsers")
    @GetMapping("/NewUser")
    public Boolean NewUser( @RequestParam("username") String username,@RequestParam("passwd") String passwd){
        System.out.println("=========newUsers=============");
        System.out.println("username:"+username);
        System.out.println("passwd:"+passwd);
        return true;
    }

    @CrossOrigin
    @ApiOperation(notes = "test",value = "test")
    @GetMapping("/test")
    public String test( @RequestParam("username") String username,@RequestParam("passwd") String passwd){
        System.out.println("=========test=============");
        System.out.println("username:"+username);
        System.out.println("passwd:"+passwd);
        return "this is a test for jacoco demo";
    }

}








